Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Programmatically adding securityManager(How to add a securityManager to the Repository)
[CDO] Programmatically adding securityManager [message #1746561] Mon, 31 October 2016 21:46 Go to next message
John Conlon is currently offline John ConlonFriend
Messages: 35
Registered: July 2009
Member
I am creating a CDO 4.4 Server programatically within an Equinox OSGi framework that allows the user to configure the various server and repo options. Within my OSGi bundle I am using the following command to create the repository:

IRepository repository = CDOServerUtil.createRepository(config.repo_name(), store, repoProps);


To add a security Manager, I see from the User Guide that I can uncomment lines in the cdo-server.xml configuration file like:
 
<!-- Example http://wiki.eclipse.org/CDO/Security_Manager
		  <securityManager type="default" description="/security:annotation:home(/home)"/>
 -->

<!-- Example http://bugs.eclipse.org/302775
			<authenticator type="file" description="_database/repo1.users"/>
 -->


How can I do this programmatically? Do I need to configure both a securityManager and authenticator?

thanks,
John

Re: [CDO] Programmatically adding securityManager [message #1746572 is a reply to message #1746561] Tue, 01 November 2016 07:59 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6579
Registered: July 2009
Senior Member
This is the relevant excerpt from org.eclipse.emf.cdo.server.spi.security.SecurityManagerFactory.Default.create():

      List<String> tokens = StringUtil.split(description, ":", "()");
      String repositoryName = tokens.get(0);
      String realmPath = tokens.get(1);

      ISecurityManager securityManager = SecurityManagerUtil.createSecurityManager(realmPath);

      for (int i = 2; i < tokens.size(); i++)
      {
        String token = tokens.get(i);
        CommitHandler handler = getHandler(container, token);
        ((InternalSecurityManager)securityManager).addCommitHandler(handler);
      }

      if (securityManager instanceof InternalSecurityManager)
      {
        ((InternalSecurityManager)securityManager).setRepository((InternalRepository)RepositoryFactory.get(container, repositoryName));
      }


All the wiring is then done automatically by org.eclipse.emf.cdo.server.internal.security.SecurityManager.init().


Re: [CDO] Programmatically adding securityManager [message #1746573 is a reply to message #1746561] Tue, 01 November 2016 08:03 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6579
Registered: July 2009
Senior Member
And the following test methods might give more clues:

org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_417483_Test.doSetUp()
org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_399487_Test.setUp()
org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_422170_Test.setUp()
org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_501607_Test.setUp()
org.eclipse.emf.cdo.tests.bugzilla.Bugzilla_418267_Test.startSecureRepository(RealmOperation)


Re: [CDO] Programmatically adding securityManager [message #1746744 is a reply to message #1746573] Fri, 04 November 2016 04:32 Go to previous messageGo to next message
John Conlon is currently offline John ConlonFriend
Messages: 35
Registered: July 2009
Member
Hi Eike,

I tried setting up security with these methods:

...
if (config.useSecurity()) {
				ISecurityManager securityManager;
				try {
					securityManager = createSecurity(repository);
					initSecurity(securityManager);
				} catch (Exception e) {
					e.printStackTrace();
				}

			}
...

private ISecurityManager createSecurity(IRepository repository) {
		IManagedContainer managedContainer = IPluginContainer.INSTANCE;
		String realmPath = "/security";
		ISecurityManager securityManager = SecurityManagerUtil.createSecurityManager(realmPath, managedContainer);
		CommitHandler handler = getHandler(managedContainer, "home(/home)");
		((InternalSecurityManager) securityManager).addCommitHandler(handler);

		return securityManager;
	}

private void initSecurity(ISecurityManager securityManager) {
		if (securityManager instanceof InternalSecurityManager) {
			((InternalSecurityManager) securityManager).setRepository((InternalRepository) repository);
		}
	}



But I can still do not see a security realm resource created in my repository, nor a user and I can still access the repository without any restrictions from my RCP CDO Sessions transaction. Surely I must be missing something? Any ideas?
thanks,
John
Re: [CDO] Programmatically adding securityManager [message #1746745 is a reply to message #1746744] Fri, 04 November 2016 05:43 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6579
Registered: July 2009
Senior Member
Most likely your security manager is not activated. If you pulled it out of the managed container that would happen automatically. But you can also activate it manually with
LifecycleUtil.activate(securityManager);
. Does that help?


Re: [CDO] Programmatically adding securityManager [message #1746775 is a reply to message #1746745] Fri, 04 November 2016 13:16 Go to previous messageGo to next message
John Conlon is currently offline John ConlonFriend
Messages: 35
Registered: July 2009
Member
Modified my initialization:

private void initSecurity(ISecurityManager securityManager) {
		if (securityManager instanceof InternalSecurityManager) {
			((InternalSecurityManager) securityManager).setRepository((InternalRepository) repository);
		}
		LifecycleUtil.activate(securityManager);
	}



Got closer but now I get exceptions:

[INFO] Security realm created in /security
[WARN] Problem while rolling back the transaction
org.eclipse.net4j.db.DBException: Schema locked: REPO1
	at org.eclipse.net4j.internal.db.ddl.DBSchema.assertUnlocked(DBSchema.java:280)
	at org.eclipse.net4j.internal.db.ddl.DBSchema.removeTable(DBSchema.java:211)
	at org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.removeClassMapping(AbstractMappingStrategy.java:695)
	at org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.mapClasses(AbstractMappingStrategy.java:666)
	at org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.mapPackageInfos(AbstractMappingStrategy.java:646)
	at org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.mapPackageUnits(AbstractMappingStrategy.java:635)
	at org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.removeMapping(AbstractMappingStrategy.java:600)
	at org.eclipse.emf.cdo.server.internal.db.DBStoreAccessor.doRollback(DBStoreAccessor.java:745)
	at org.eclipse.emf.cdo.spi.server.StoreAccessorBase.rollback(StoreAccessorBase.java:203)
	at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.rollback(TransactionCommitContext.java:1287)
	at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.handleException(TransactionCommitContext.java:722)
	at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.write(TransactionCommitContext.java:660)
	at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:48)
	at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:1)
	at org.eclipse.net4j.util.om.monitor.ProgressDistributor.run(ProgressDistributor.java:96)
	at org.eclipse.emf.cdo.internal.server.Repository.commitUnsynced(Repository.java:1144)
	at org.eclipse.emf.cdo.internal.server.Repository.commit(Repository.java:1137)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicatingCommit(CommitTransactionIndication.java:293)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicating(CommitTransactionIndication.java:101)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CDOServerIndicationWithMonitoring.indicating(CDOServerIndicationWithMonitoring.java:110)
	at org.eclipse.net4j.signal.IndicationWithMonitoring.indicating(IndicationWithMonitoring.java:98)
	at org.eclipse.net4j.signal.IndicationWithResponse.doExtendedInput(IndicationWithResponse.java:100)
	at org.eclipse.net4j.signal.Signal.doInput(Signal.java:369)
	at org.eclipse.net4j.signal.IndicationWithResponse.execute(IndicationWithResponse.java:73)
	at org.eclipse.net4j.signal.IndicationWithMonitoring.execute(IndicationWithMonitoring.java:67)
	at org.eclipse.net4j.signal.Signal.runSync(Signal.java:275)
	at org.eclipse.net4j.signal.Signal.run(Signal.java:154)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
2016-11-04 08:09:50,215, WARN, com.verticon.cdo.server.provider.RepositoryServer, com.verticon.cdo.server.provider.RepositoryServer$1@246d00c8 Problem while rolling back the transaction
org.eclipse.net4j.util.WrappedException: org.eclipse.emf.cdo.util.CommitException: Rollback in DBStore: org.eclipse.net4j.db.DBException: org.h2.jdbc.JdbcSQLException: Value too long for column "CDO_CLASS VARCHAR(60)": "'http://www.eclipse.org/emf/CDO/security/4.1.0#//FilterPermission' (64)"; SQL statement:
INSERT INTO CDO_OBJECTS(CDO_ID,CDO_CLASS,CDO_CREATED) VALUES (?, ?, ?) [22001-192]
	at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.ObjectTypeTable.putObjectType(ObjectTypeTable.java:136)
	at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.DelegatingObjectTypeMapper.putObjectType(DelegatingObjectTypeMapper.java:71)
	at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractHorizontalMappingStrategy.putObjectType(AbstractHorizontalMappingStrategy.java:87)
	at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.HorizontalBranchingClassMapping.writeRevision(HorizontalBranchingClassMapping.java:715)
	at org.eclipse.emf.cdo.server.internal.db.DBStoreAccessor.writeRevision(DBStoreAccessor.java:591)
	at org.eclipse.emf.cdo.server.internal.db.DBStoreAccessor.writeRevisions(DBStoreAccessor.java:571)
	at org.eclipse.emf.cdo.spi.server.StoreAccessor.doWrite(StoreAccessor.java:98)
	at org.eclipse.emf.cdo.server.internal.db.DBStoreAccessor.doWrite(DBStoreAccessor.java:831)
	at org.eclipse.emf.cdo.spi.server.StoreAccessorBase.write(StoreAccessorBase.java:152)
	at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.write(TransactionCommitContext.java:651)
	at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:48)
	at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:1)
	at org.eclipse.net4j.util.om.monitor.ProgressDistributor.run(ProgressDistributor.java:96)
	at org.eclipse.emf.cdo.internal.server.Repository.commitUnsynced(Repository.java:1144)
	at org.eclipse.emf.cdo.internal.server.Repository.commit(Repository.java:1137)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicatingCommit(CommitTransactionIndication.java:293)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicating(CommitTransactionIndication.java:101)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CDOServerIndicationWithMonitoring.indicating(CDOServerIndicationWithMonitoring.java:110)
	at org.eclipse.net4j.signal.IndicationWithMonitoring.indicating(IndicationWithMonitoring.java:98)
	at org.eclipse.net4j.signal.IndicationWithResponse.doExtendedInput(IndicationWithResponse.java:100)
	at org.eclipse.net4j.signal.Signal.doInput(Signal.java:369)
	at org.eclipse.net4j.signal.IndicationWithResponse.execute(IndicationWithResponse.java:73)
	at org.eclipse.net4j.signal.IndicationWithMonitoring.execute(IndicationWithMonitoring.java:67)
	at org.eclipse.net4j.signal.Signal.runSync(Signal.java:275)
	at org.eclipse.net4j.signal.Signal.run(Signal.java:154)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.h2.jdbc.JdbcSQLException: Value too long for column "CDO_CLASS VARCHAR(60)": "'http://www.eclipse.org/emf/CDO/security/4.1.0#//FilterPermission' (64)"; SQL statement:
INSERT INTO CDO_OBJECTS(CDO_ID,CDO_CLASS,CDO_CREATED) VALUES (?, ?, ?) [22001-192]
	at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
	at org.h2.message.DbException.get(DbException.java:179)
	at org.h2.table.Column.validateConvertUpdateSequence(Column.java:335)
	at org.h2.table.Table.validateConvertUpdateSequence(Table.java:784)
	at org.h2.command.dml.Insert.insertRows(Insert.java:151)
	at org.h2.command.dml.Insert.update(Insert.java:114)
	at org.h2.command.CommandContainer.update(CommandContainer.java:98)
	at org.h2.command.Command.executeUpdate(Command.java:258)
	at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:160)
	at org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:146)
	at org.eclipse.net4j.db.jdbc.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:81)
	at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.ObjectTypeTable.putObjectType(ObjectTypeTable.java:120)
	... 27 more

	at org.eclipse.net4j.util.WrappedException.wrap(WrappedException.java:54)
	at org.eclipse.emf.cdo.server.internal.security.SecurityManager.init(SecurityManager.java:590)
	at org.eclipse.emf.cdo.server.internal.security.SecurityManager.doActivate(SecurityManager.java:848)
	at org.eclipse.net4j.util.lifecycle.Lifecycle.internalActivate(Lifecycle.java:76)
	at org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycle.java:162)
	at org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(LifecycleUtil.java:127)
	at org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(LifecycleUtil.java:117)
	at com.verticon.cdo.server.provider.RepositoryServer.initSecurity(RepositoryServer.java:496)
	at com.verticon.cdo.server.provider.RepositoryServer.modified(RepositoryServer.java:479)
	at com.verticon.cdo.server.provider.RepositoryServer.activate(RepositoryServer.java:295)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
	at org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:222)
	at org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:37)
	at org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:615)
	at org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:499)
	at org.apache.felix.scr.impl.helper.ActivateMethod.invoke(ActivateMethod.java:295)
	at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:302)
	at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:113)
	at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:866)
	at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:833)
	at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:724)
	at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:399)
	at org.apache.felix.scr.impl.config.ConfigurableComponentHolder.configurationUpdated(ConfigurableComponentHolder.java:424)
	at org.apache.felix.scr.impl.config.ConfigurationSupport.configurationEvent(ConfigurationSupport.java:315)
	at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.sendEvent(ConfigurationManager.java:2046)
	at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.run(ConfigurationManager.java:2014)
	at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:103)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.eclipse.emf.cdo.util.CommitException: Rollback in DBStore: org.eclipse.net4j.db.DBException: org.h2.jdbc.JdbcSQLException: Value too long for column "CDO_CLASS VARCHAR(60)": "'http://www.eclipse.org/emf/CDO/security/4.1.0#//FilterPermission' (64)"; SQL statement:
INSERT INTO CDO_OBJECTS(CDO_ID,CDO_CLASS,CDO_CREATED) VALUES (?, ?, ?) [22001-192]
	at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.ObjectTypeTable.putObjectType(ObjectTypeTable.java:136)
	at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.DelegatingObjectTypeMapper.putObjectType(DelegatingObjectTypeMapper.java:71)
	at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractHorizontalMappingStrategy.putObjectType(AbstractHorizontalMappingStrategy.java:87)
	at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.HorizontalBranchingClassMapping.writeRevision(HorizontalBranchingClassMapping.java:715)
	at org.eclipse.emf.cdo.server.internal.db.DBStoreAccessor.writeRevision(DBStoreAccessor.java:591)
	at org.eclipse.emf.cdo.server.internal.db.DBStoreAccessor.writeRevisions(DBStoreAccessor.java:571)
	at org.eclipse.emf.cdo.spi.server.StoreAccessor.doWrite(StoreAccessor.java:98)
	at org.eclipse.emf.cdo.server.internal.db.DBStoreAccessor.doWrite(DBStoreAccessor.java:831)
	at org.eclipse.emf.cdo.spi.server.StoreAccessorBase.write(StoreAccessorBase.java:152)
	at org.eclipse.emf.cdo.internal.server.TransactionCommitContext.write(TransactionCommitContext.java:651)
	at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:48)
	at org.eclipse.emf.cdo.spi.server.InternalCommitContext$1.runLoop(InternalCommitContext.java:1)
	at org.eclipse.net4j.util.om.monitor.ProgressDistributor.run(ProgressDistributor.java:96)
	at org.eclipse.emf.cdo.internal.server.Repository.commitUnsynced(Repository.java:1144)
	at org.eclipse.emf.cdo.internal.server.Repository.commit(Repository.java:1137)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicatingCommit(CommitTransactionIndication.java:293)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CommitTransactionIndication.indicating(CommitTransactionIndication.java:101)
	at org.eclipse.emf.cdo.server.internal.net4j.protocol.CDOServerIndicationWithMonitoring.indicating(CDOServerIndicationWithMonitoring.java:110)
	at org.eclipse.net4j.signal.IndicationWithMonitoring.indicating(IndicationWithMonitoring.java:98)
	at org.eclipse.net4j.signal.IndicationWithResponse.doExtendedInput(IndicationWithResponse.java:100)
	at org.eclipse.net4j.signal.Signal.doInput(Signal.java:369)
	at org.eclipse.net4j.signal.IndicationWithResponse.execute(IndicationWithResponse.java:73)
	at org.eclipse.net4j.signal.IndicationWithMonitoring.execute(IndicationWithMonitoring.java:67)
	at org.eclipse.net4j.signal.Signal.runSync(Signal.java:275)
	at org.eclipse.net4j.signal.Signal.run(Signal.java:154)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.h2.jdbc.JdbcSQLException: Value too long for column "CDO_CLASS VARCHAR(60)": "'http://www.eclipse.org/emf/CDO/security/4.1.0#//FilterPermission' (64)"; SQL statement:
INSERT INTO CDO_OBJECTS(CDO_ID,CDO_CLASS,CDO_CREATED) VALUES (?, ?, ?) [22001-192]
	at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
	at org.h2.message.DbException.get(DbException.java:179)
	at org.h2.table.Column.validateConvertUpdateSequence(Column.java:335)
	at org.h2.table.Table.validateConvertUpdateSequence(Table.java:784)
	at org.h2.command.dml.Insert.insertRows(Insert.java:151)
	at org.h2.command.dml.Insert.update(Insert.java:114)
	at org.h2.command.CommandContainer.update(CommandContainer.java:98)
	at org.h2.command.Command.executeUpdate(Command.java:258)
	at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:160)
	at org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:146)
	at org.eclipse.net4j.db.jdbc.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:81)
	at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.ObjectTypeTable.putObjectType(ObjectTypeTable.java:120)
	... 27 more

	at org.eclipse.emf.internal.cdo.transaction.CDOSingleTransactionStrategyImpl.commit(CDOSingleTransactionStrategyImpl.java:89)
	at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commitSynced(CDOTransactionImpl.java:1316)
	at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commit(CDOTransactionImpl.java:1290)
	at org.eclipse.emf.internal.cdo.transaction.CDOTransactionImpl.commit(CDOTransactionImpl.java:1257)
	at org.eclipse.emf.cdo.server.internal.security.SecurityManager.init(SecurityManager.java:586)
	... 29 more

Re: [CDO] Programmatically adding securityManager [message #1746788 is a reply to message #1746775] Fri, 04 November 2016 15:32 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6579
Registered: July 2009
Senior Member
Do you set the idColumnLength to just 60? I suspect that you're using client-assigned IDs and you're assuming that all IDs are object UUIDS. But there are also meta IDs (i.e., IDs for all your EModelElements) which are often longer than normal UUIDs.

Re: [CDO] Programmatically adding securityManager [message #1746798 is a reply to message #1746788] Fri, 04 November 2016 16:39 Go to previous messageGo to next message
John Conlon is currently offline John ConlonFriend
Messages: 35
Registered: July 2009
Member
Yes, I am using client-assigned IDs, but I am not aware of me setting the idColumnLength in either the CDO Repo or the H2 DB. Where do I set the idColumnLength and to what value?
Re: [CDO] Programmatically adding securityManager [message #1746800 is a reply to message #1746798] Fri, 04 November 2016 17:15 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6579
Registered: July 2009
Senior Member
You can set it before you activate the store:

IDBStore store = ...;
store.getProperties().put(IDBStore.Props.ID_COLUMN_LENGTH, 255);


Re: [CDO] Programmatically adding securityManager [message #1746801 is a reply to message #1746800] Fri, 04 November 2016 17:52 Go to previous messageGo to next message
John Conlon is currently offline John ConlonFriend
Messages: 35
Registered: July 2009
Member
Of course. I have it in my configuration, but just overlooked it. Since this property changed I needed to also create a new database. Once I did, it works!
Now to explore setting up security.

thanks Eike

John
Re: [CDO] Programmatically adding securityManager [message #1746802 is a reply to message #1746801] Fri, 04 November 2016 18:03 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6579
Registered: July 2009
Senior Member
You're welcome. I'm glad that it works now Wink

Previous Topic:Read sequence diagram Xmi by EMF
Next Topic:[CDO] postgresql Junit Tests
Goto Forum:
  


Current Time: Sun Jun 20 23:35:22 GMT 2021

Powered by FUDForum. Page generated in 0.02620 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top