[JBoss AOP] - Re: howto hotswap ?
by waffels
i want to intercept the execution of the method
private static void startSend(OutputStream os,File file) throws IOException
so i made the following binding:
AdviceBinding binding = new AdviceBinding("execution(private static void src.Client->startSend(java.io.OutputStream, java.io.File))", null);
binding.addInterceptor(ClientSendFileInterceptor.class);
AdviceBinding binding2 = new AdviceBinding("execution(private * src.Client->startSend(java.io.OutputStream, java.io.File))", null);
AspectManager.instance().addBinding(binding);
but it won't work, is it possible that eclipse is corrupting things, i've added the VM arguments, i can't see what i'm doing wrong, the interception just doesn't happen...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3974548#3974548
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3974548
19 years, 7 months
[JBossCache] - Urgent- Socket error when adding object to DB using JDBC Cac
by mitra123
Hi,
I am currently trying to test the following scenario:
Add 10000/20000/50000 objects to cache1 in JVM1, persist the data to DB (MYSQL) and read the data in cache 2 (separate JVM)
After about adding 1793 objects to DB, I get the following error:
MESSAGE: java.net.BindException: Address already in use: connect
STACKTRACE:
java.net.SocketException: java.net.BindException: Address already in use: connect
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:156)
at com.mysql.jdbc.MysqlIO.(MysqlIO.java:284)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2541)
at com.mysql.jdbc.Connection.(Connection.java:1474)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:266)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at org.jboss.cache.loader.JDBCCacheLoader$NonManagedConnectionFactory.getConnection(JDBCCacheLoader.java:1410)
at org.jboss.cache.loader.JDBCCacheLoader.loadNode(JDBCCacheLoader.java:1071)
at org.jboss.cache.loader.JDBCCacheLoader.get(JDBCCacheLoader.java:263)
at org.jboss.cache.loader.AsyncCacheLoader.get(AsyncCacheLoader.java:171)
at org.jboss.cache.interceptors.CacheLoaderInterceptor.loadData(CacheLoaderInterceptor.java:415)
at org.jboss.cache.interceptors.CacheLoaderInterceptor.loadNode(CacheLoaderInterceptor.java:326)
at org.jboss.cache.interceptors.CacheLoaderInterceptor.invoke(CacheLoaderInterceptor.java:165)
at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
at org.jboss.cache.interceptors.UnlockInterceptor.invoke(UnlockInterceptor.java:32)
at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
at org.jboss.cache.interceptors.ReplicationInterceptor.invoke(ReplicationInterceptor.java:34)
at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
at org.jboss.cache.interceptors.CacheStoreInterceptor.invoke(CacheStoreInterceptor.java:135)
at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
at org.jboss.cache.interceptors.TxInterceptor.handleNonTxMethod(TxInterceptor.java:345)
at org.jboss.cache.interceptors.TxInterceptor.invoke(TxInterceptor.java:156)
at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
at org.jboss.cache.interceptors.CacheMgmtInterceptor.invoke(CacheMgmtInterceptor.java:138)
at org.jboss.cache.TreeCache.invokeMethod(TreeCache.java:5517)
at org.jboss.cache.TreeCache.get(TreeCache.java:3468)
at org.jboss.cache.TreeCache.get(TreeCache.java:3449)
at org.jboss.cache.TreeCache.get(TreeCache.java:3245)
at org.jboss.cache.aop.InternalDelegate.get(InternalDelegate.java:123)
at org.jboss.cache.aop.InternalDelegate.getAopInstance(InternalDelegate.java:71)
at org.jboss.cache.aop.InternalDelegate.getPojo(InternalDelegate.java:221)
at org.jboss.cache.aop.TreeCacheAopDelegate._putObject(TreeCacheAopDelegate.java:171)
at org.jboss.cache.aop.PojoCache._putObject(PojoCache.java:731)
at org.jboss.cache.aop.PojoCache.putObject(PojoCache.java:462)
at org.jboss.cache.aop.PojoCache.putObject(PojoCache.java:423)
at test.examples.StudentMaintTest.testObjectPutInCache(StudentMaintTest.java:142)
at test.examples.StudentMaintTest.init(StudentMaintTest.java:123)
at test.examples.StudentMaintTest.setUp(StudentMaintTest.java:58)
at test.examples.StudentMaintTest.main(StudentMaintTest.java:252)
I have configured JDBBC cacheloader in the xml file as follows:
<!-- if passivation is true, only the first cache loader is used; the rest are ignored -->
false
/aop
true
<!-- we can now have multiple cache loaders, which get chained -->
org.jboss.cache.loader.JDBCCacheLoader
<!-- same as the old CacheLoaderConfig attribute -->
cache.jdbc.table.name=jbosscache
cache.jdbc.table.create=true
cache.jdbc.table.drop=false
cache.jdbc.table.primarykey=jbosscache_pk
cache.jdbc.fqn.column=fqn
cache.jdbc.fqn.type=varchar(255)
cache.jdbc.node.column=node
cache.jdbc.node.type=longblob
cache.jdbc.parent.column=parent
cache.jdbc.driver=com.mysql.jdbc.Driver
cache.jdbc.url=jdbc:mysql://localhost:3306/test
cache.jdbc.user=root
cache.jdbc.password=secretpassword
<!-- whether the cache loader writes are asynchronous -->
true
<!-- only one cache loader in the chain may set fetchPersistentState to true.
An exception is thrown if more than one cache loader sets this to true. -->
false
<!-- determines whether this cache loader ignores writes - defaults to false. -->
false
<!-- if set to true, purges the contents of this cache loader when the cache starts up.
Defaults to false. -->
false
Could you please help me out and point me in the right direction?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3974536#3974536
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3974536
19 years, 7 months
[EJB 3.0] - Super and sub class from different entityManagers when using
by jarkko@jab.fi
Hello,
I've the following setup:
0) EAR file with the following inside
1) 2 EJB jar files (jar1.jar and jar2.jar) with their own persistence.xmls and entitymanagers (em1 and em2)
2) Entitymanagers are using different datasources (but to the same db)
in jar1.jar i've
| @Entity
| @Table(name = "CalEvent", catalog = "lportal", uniqueConstraints = {})
| @Inheritance(strategy = InheritanceType.JOINED)
| public class Calevent implements java.io.Serializable {
and in jar2.jar i've
@Entity
| @Name("task")
| @Table(name = "task", catalog = "tc", uniqueConstraints = {})
| @Inheritance(strategy = InheritanceType.JOINED)
| public class Task extends Calevent {
|
also in jar2.jar i've a SFSB which is acting as on action where new Task's are created:
| Task t = new Task();
| t.setBlaBla();
| em2.persist(t);
|
Now, however, during the insertion it doesn't work. I've figured that it's because the super classes instance is not persisted/commited to the db and thus i'm using two different ems / datasources the em2/ jdbc connection2 can't yet see the super classes stuff in the db.
So, i tried to set up
| <property name="hibernate.transaction.flush_before_completion" value="true" /> in persistence.xml,
to see if it helps, but the setting is ignored by HEM.
>From log i can see that the calevent's insert SQL is before task's, but em1 (calevent's) is not yet synced to the db so the row doesn't actually exists in the db yet. And there seems to be foreing key constraint (generated by Hibernate) between task.eventId and calevent.eventId which is causing the very distracting duplicate key error message.
anonymous wrote :
| 4093449 15:25:47,379 INFO [STDOUT] Hibernate: insert into lportal.CalEvent (type_, startDate, description, userName, userId, companyId, groupId, modifiedDate, createDate, title, firstReminder, secondReminder, remindBy, recurrence, endDate, durationHour, durationMinute, allDay, timeZoneSensitive, repeating, eventId) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
| 4093450 15:25:47,380 INFO [STDOUT] Hibernate: insert into tc.task(poikkeuksin, tehty, kohde_organizationId, eventId) values (?, ?, ?, ?)
| 4095969 15:25:49,899 WARN [JDBCExceptionReporter] SQL Error: 1062, SQLState: 23000
| 4095970 15:25:49,900 ERROR [JDBCExceptionReporter] Duplicate entry '18' for key 1
|
So, is there a way to force flush/commit on the insertion of calEvent?
The reason that i've two EntityManagers and two different datasources (with differens users and privileges inside the db) is that i want to use ejb3/hibs create/update schema but also to make sure that em2 doesn't mess with the db schema presented by em1.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3974535#3974535
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3974535
19 years, 7 months
[JBossCache] - Re: Two nodes updating cache concurrently using a PojoCacheM
by jbirkenmaier
Update: I have been tinkering with the code and removed the transaction that surrounds my cache updating and the exceptions have gone away (no surprise there). However, there is still a big problem. The two remaining nodes still update their own cache (with the hope that the updates will be replicated on the other remaining node).
What is now happening is that out of 5 tree cache elements (nodes) removed, only 3 of these are actually deleted from the cache. I display each cache node as it is deleted so I know how many and which ones are targeted. 5 nodes are displayed but afterwards, two of those nodes are still in the cache!
I use Pojo cache and these 5 nodes are part of the same Java Set so I cannot fathom why some of the nodes would be deleted and some would remain. I iterate through the set and look for matches to my search criteria. When I find a match, I remove the object from the Set. Please tell me how this can fail to work. Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3974532#3974532
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3974532
19 years, 7 months
[JBoss jBPM] - BPEL - beta2 "no port implements the required port type"
by KVAK_TNT
Hi there!
I wanted to migrate my implementation from beta1 to beta2 but I get this error...
I have allready found in fisheye which part throws this failure, but I cannot find where I made this failure?
I get the following message:
Caused by: java.lang.RuntimeException: no port implements the required port type: portType={urn:samples:agilpro}AgilproIssuer
| at org.jbpm.bpel.integration.exe.SoapEndpointReference.selectPort(SoapEndpointReference.java:139)
| at org.jbpm.bpel.integration.exe.SoapEndpointReference.selectPort(SoapEndpointReference.java:95)
| at org.jbpm.bpel.integration.jms.IntegrationControl.getPartnerClient(IntegrationControl.java:234)
| at org.jbpm.bpel.integration.jms.JmsIntegrationService.invoke(JmsIntegrationService.java:171)
| at org.jbpm.bpel.def.Invoke.execute(Invoke.java:44)
| at org.jbpm.bpel.def.Activity.enter(Activity.java:101)
| ... 24 more
OK - it says me urn:samples:agilpro and AgilproIssuer.
I get this error when I try to start an invoke activity.
It is the same code as bevore but It won't work now...
Can someone give me a hint what causes this error really?
Greetings
Claus
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3974530#3974530
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3974530
19 years, 7 months