[Spring Integration] - Re: How to access deployed bean reference from a different s
by marius.bogoevici
My previous post had a formatting error and was barely readable, so let me
repost it:
Ivan,
<description>ParentBeanFactory="BillingFramework"</description> won't work in the JBoss Deployer, you need to use braces, but apart from that, it is a JBoss Deployer specific feature, and I don't think Mule (or for that matter any Spring context bootstrapping mechanism, other than the JBoss deployer) will recognize it.
I'm not that familiar with the way Mule bootstraps their application context, but, generally speaking, in this case you want to retrieve the JBoss Deployer-bootstrapped application context from JNDI and set it as a parent for your new context (before the bean definitions are actually parsed and beans are instantiated, ideally in the constructor). This is what we do internally in the Deployer. So, I would look in Mule if it has a mechanism that allows you do do this.
Marius
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267909#4267909
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267909
14 years, 5 months
[EJB 3.0 Users] - Re: EJB jar cannot be deployed as a library (JBoss 5.0.1.GA)
by jaikiran
Ralph,
I looked at that application and it's packaging looks invalid on one count and a bit weird on another count.
The invalid part is - the persistence.xml is deployed through the META-INF of the my_ejb_module.jar. Which means that, as per the EJB3 spec, the persistence unit is scoped only to that jar and will not be visible outside it. So you can't inject using @PersistenceContext from some other jar (imixs-workflow-jee-impl-x.x.x.jar). If you want the persistence unit to be visible to all components in the ear, then you will have to place the persistence.xml in the .ear/META-INF folder.
The weird part about the packaging is - the my_ejb_module.jar is mapped as a EJB module and contains only the descriptors (ejb-jar.xml, jboss.xml etc..). No classes within that jar. The EJB interfaces and the implementations are then packaged in imixs-workflow-jee-x.x.x.jar, imixs-workflow-jee-impl-x.x.x.jar and placed in the .ear/lib folder. This is causing issues with the EJB3 deployers. Ideally, the bean implementations should be outside the lib folder, at the root of the ear. Why not package those implementations in the my_ejb_module.jar?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267907#4267907
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267907
14 years, 5 months
[Persistence] - HQL query doesn't have same result when deployed in JBoss
by ptitjeojeo
Hello everybody,
I don't know if there is the good place for this post...
Maven dependencies :
- hibernate-3.2.4.sp1
- hibernate-entitymanager-3.2.1.ga
- hibernate-annotation-3.2.1.ga
- persistence-api-1.0
- mysql-connector-java-5.1.8
Application Server : JBoss 4.2.3
Database Server : MySQL 5.1
The hibernate library are those that can be found in the /lib folder of JBoss 4.2.3.
I have a different behaviour when I test my application via JUnit and via my Web Application deployed under JBoss.
I have a class MyClass with a property type. The type property is an enumeration define like that :
@Enumerated(EnumType.STRING)
I have the following query :
SELECT m FROM MaClasse WHERE m.type = ?
|
| request.setParameter(Type.TEST);
When I test the query with a JUnit test, the type parameters is correctly replaced by the "TEST" value in the sql query.
If i deploy the WebApplication and do the same test the type parameters is not replaced by "TEST" value but by a strange value with hexa characters "2c14f2c45d47d58c8c8c8c8......"
I've put the debug mode and I found that the Enumeration is not evaluated in the same way :
- JUnit : EnumType
- JBoss : SerializableType.
My question is, why such behaviour ? Is there a specific link between JBoss and hibernate libraries ???
I tried to delete hibernate libraries from JBoss.. it didn't work.
If someone has already encountered this kind of problem ??
Thanks in advance.
ps : I can prepare a little test to reproduce the behaviour if you want.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267892#4267892
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267892
14 years, 5 months