0

I want to know is there any tutorial or program that shows all necessary actions for to create nodes in modeshape and to store in a SQL Server database?

I'm well struggling with this new technology and I don't have any help around.

With the help of some experts I have some global ideas

On start the engine: create a session and create nodes save the session and shut down the engine.

I want to know how he makes the link with the database.

I have created the nodes.

  1. I have installed SQL jdbc with the help of maven

  2. I have added the dependencyin pom.xml file.

  3. I want to know should I do things in config.json?

  4. What should I do in infinspan.xml?

  5. How they store in database (either by an insert)?

I badly need some help.

Thanks for your precious help

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • Please read [Stack Overflow question checklist](http://meta.stackexchange.com/questions/156810/stack-overflow-question-checklist) – huMpty duMpty Apr 22 '14 at 10:09

1 Answers1

0

1&2 no problem at all

3 nothing, as long as it works with default settings

5 I don't know, maybe Randall Hauch can answer about it.

4 compared to the example given from git(),here's something you needed to edit, pay attention to everything begin with an '#'

<persistence passivation="false">
<stringKeyedJdbcStore xmlns="urn:infinispan:config:jdbc:6.0"
    fetchPersistentState="false"
    ignoreModifications="false"
    purgeOnStartup="false">
<connectionPool
        connectionUrl="jdbc:sqlserver://localhost:1433;databaseName=#YourDBName;DB_CLOSE_DELAY=-1"
        driverClass="com.microsoft.sqlserver.jdbc.SQLServerDriver"
        username="#yourusername"
        password="#yourpassword"/>
<stringKeyedTable
        prefix="ISPN_STRING_TABLE"
        createOnStart="true"
        dropOnExit="false">
    <idColumn name="ID_COLUMN" type="#NVARCHAR(255)"/>
    <dataColumn name="DATA_COLUMN" type="#VARBINARY(MAX)"/>
    <timestampColumn name="TIMESTAMP_COLUMN" type="BIGINT"/>
</stringKeyedTable>
</stringKeyedJdbcStore>
</persistence>

ps: Why varbinary(max)? I don't know... The binary data inserted is only around 10 kbits at size, but IT WILL GO WRONG with binary(8000), or any number smaller.

pps: Why NVARCHAR(255)?

You need to make the ID_COLUMN in Infinispan NVARCHAR not VARCHAR, because Unicode support is required. See Re: Modeshape with MS SQL Server 2008 \ 2010 for the similar issue.--Horia Chiorean from https://community.jboss.org/en/modeshape

ppps: He answered the question in the minute I posted...

MCIS
  • 1
  • 3